#pragma once

class CSelectProcessDlg	: public CBkDialogImpl<CSelectProcessDlg>
	,public CWHRoundRectFrameHelper<CSelectProcessDlg>
{
public:
	CSelectProcessDlg(void);
	~CSelectProcessDlg(void);
		void InitEx(const std::vector<std::basic_string<TCHAR> >& vSelectable);

	CString GetEnteredText() { return m_strEnteredValue; }
protected:
	LRESULT		OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	BOOL		OnInitDialog(HWND wParam, LPARAM lParam);	
	LRESULT		OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	void		OnBkBtnClose();
	void		OnOK();	
	void		_init();
public:
	BK_NOTIFY_MAP(IDC_RICHVIEW_WIN);
		BK_NOTIFY_ID_COMMAND(IDC_BTN_SYS_CLOSE,					OnBkBtnClose)
		BK_NOTIFY_ID_COMMAND(IDC_BTN_DLG_OK,			OnOK)
		BK_NOTIFY_ID_COMMAND(IDC_BTN_DLG_CANCEL,		OnBkBtnClose)		
	
	BK_NOTIFY_MAP_END()

	BEGIN_MSG_MAP_EX(CSelectProcessDlg)	
		MSG_BK_NOTIFY(IDC_RICHVIEW_WIN)
		CHAIN_MSG_MAP(CBkDialogImpl<CSelectProcessDlg>)
		CHAIN_MSG_MAP(CWHRoundRectFrameHelper<CSelectProcessDlg>)
		MESSAGE_HANDLER(WM_CREATE,				OnCreate)
		MESSAGE_HANDLER(WM_DESTROY,				OnDestroy)	
		MSG_WM_INITDIALOG(OnInitDialog)	

		REFLECT_NOTIFICATIONS_EX()
	END_MSG_MAP()		
private:
	CComboBox m_cmbInput;
	CEdit m_tbInput;
	std::vector<std::basic_string<TCHAR> > m_vSelectable;

	CString m_strEnteredValue;
};
